<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
request.setCharacterEncoding("UTF-8");
String htmlData = request.getParameter("content1") != null ? request.getParameter("content1") : "";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<meta charset="utf-8" />
	<title>KindEditor JSP</title>
	<link rel="stylesheet" href="../themes/default/default.css" />
	<link rel="stylesheet" href="../plugins/code/prettify.css" />
	<script  charset="utf-8" src="../kindeditor.js"></script>
	<script  charset="utf-8" src="../lang/zh_CN.js"></script>
	<script  charset="utf-8" src="../plugins/code/prettify.js"></script>
	<style type="text/css">
	</style>
	<script>
	var editor1;
	//var editWidth=566;//编辑器宽度
	window.onload=function(){
	//初始化字体大小
	 editor1.exec('fontsize', '16px');
	 };
	function update(){
		
		parent.document.getElementById("${param.id}").value= editor1.html();
	}
	function insertInfoContent(val){
	editor1.html(editor1.html()+""+val);
	
	}
	function updateInfoContent(val){
	editor1.html(val);
	}
	
	KindEditor.ready(function(K) {
			var data={
				cssPath : '../plugins/code/prettify.css',
				allowFileManager : true,
				fullscreenMode: true,
				cssData :''
				
			};
			/*if('${param.type}'!=null&&'${param.type}'== '0'){
			data.cssData='.ke-content{width:148mm;padding:0 197;}';
			}*/
			editor1 = K.create('textarea[name="content1"]',data);
			//闷男添加变参数更改PADDING
			/*var myIframe = K.query(".ke-edit-iframe");
			var mybody = myIframe.contentWindow.document.body;
			var myWidth=mybody.clientWidth-editWidth;
			function winresize() {
				if(myWidth>0){
				mybody.style.paddingLeft = myWidth/2;
				mybody.style.paddingRight = myWidth/2;
				}
			}
			var container = K.query(".ke-container");
			container.onresize= function() {
				winresize();
			}
			container.onresize();*/
			//闷男结束
		prettyPrint();
	});
	

	</script>
</head>
<body>

		<textarea name="content1" cols="100" rows="8" style="width:700px;height:200px;visibility:hidden;"></textarea>

</body>
</html>
